module.exports = {
	getMonthEn: function(month) {
		switch (month) {
			case 0:
				return "Janurary";
				break;
			case 1:
				return "February";
				break;
			case 2:
				return "March";
				break;
			case 3:
				return "April";
				break;
			case 4:
				return "May";
				break;
			case 5:
				return "June";
				break;
			case 6:
				return "July";
				break;
			case 7:
				return "August";
				break;
			case 8:
				return "September";
				break;
			case 9:
				return "October";
				break;
			case 10:
				return "November";
				break;
			case 11:
				return "December";
				break;
			default:
				return "False";
				break;
		}
	},
	getDayEn: function(day) {
		switch (day) {
			case 1:
				return "Mon";
				break;
			case 2:
				return "Tue";
				break;
			case 3:
				return "Wed";
				break;
			case 4:
				return "Thu";
				break;
			case 5:
				return "Fri";
				break;
			case 6:
				return "Sat";
				break;
			case 0:
				return "Sun";
				break;
			default:
				return "False";
				break;
		}
	},
	Format: function(time, fmt) { //author: meizz
		var _date = new Date(time);
		var o = {
			"M+": _date.getMonth() + 1, //月份   
			"D+": _date.getDate(), //日   
			"h+": _date.getHours(), //小时   
			"m+": _date.getMinutes(), //分   
			"s+": _date.getSeconds(), //秒   
			"q+": Math.floor((_date.getMonth() + 3) / 3), //季度   
			"S": _date.getMilliseconds() //毫秒   
		};
		if (/(Y+)/.test(fmt))
			fmt = fmt.replace(RegExp.$1, (_date.getFullYear() + "").substr(4 - RegExp.$1.length));
		for (var k in o)
			if (new RegExp("(" + k + ")").test(fmt))
				fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
		return fmt;
	}
}